import time
def hello(a):
    for i in range(len(a)-1):
        for b in range(len(a)-i-1):
            if a[b] > a[b+1]:
                a[b], a[b+1] = a[b+1], a[b]



t = ["m1_sorted.txt", "m2_reverse.txt", "m3_shuffle.txt"]
for file in t:
    with open(file,"r") as t:
        m =[int(line) for line in t]
        q = time.time()
        hello(m)
        l = time.time()
        w= int((l-q)*1000)
        file = file.split(".")[0]
        print(f"{file} {w} milliseconds")
